<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - code analysis - /usr/include/boost/algorithm/string/split.hpp</title>
  <link rel="stylesheet" type="text/css" href="../../../../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../../../../index.html">top level</a> - <a href="index.html">usr/include/boost/algorithm/string</a> - split.hpp<span style="font-size: 80%;"> (source / <a href="split.hpp.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">code analysis</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">3</td>
            <td class="headerCovTableEntry">3</td>
            <td class="headerCovTableEntryHi">100.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2020-09-11 22:25:26</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">1</td>
            <td class="headerCovTableEntry">2</td>
            <td class="headerCovTableEntryLo">50.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Legend:</td>
            <td class="headerValueLeg">            Lines:
            <span class="coverLegendCov">hit</span>
            <span class="coverLegendNoCov">not hit</span>
</td>
            <td></td>
          </tr>
          <tr><td><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">          Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>            : //  Boost string_algo library split.hpp header file  ---------------------------//</a>
<span class="lineNum">       2 </span>            : 
<span class="lineNum">       3 </span>            : //  Copyright Pavol Droba 2002-2006.
<span class="lineNum">       4 </span>            : //
<span class="lineNum">       5 </span>            : // Distributed under the Boost Software License, Version 1.0.
<span class="lineNum">       6 </span>            : //    (See accompanying file LICENSE_1_0.txt or copy at
<span class="lineNum">       7 </span>            : //          http://www.boost.org/LICENSE_1_0.txt)
<span class="lineNum">       8 </span>            : 
<span class="lineNum">       9 </span>            : //  See http://www.boost.org/ for updates, documentation, and revision history.
<span class="lineNum">      10 </span>            : 
<span class="lineNum">      11 </span>            : #ifndef BOOST_STRING_SPLIT_HPP
<span class="lineNum">      12 </span>            : #define BOOST_STRING_SPLIT_HPP
<span class="lineNum">      13 </span>            : 
<span class="lineNum">      14 </span>            : #include &lt;boost/algorithm/string/config.hpp&gt;
<span class="lineNum">      15 </span>            : 
<span class="lineNum">      16 </span>            : #include &lt;boost/algorithm/string/iter_find.hpp&gt;
<span class="lineNum">      17 </span>            : #include &lt;boost/algorithm/string/finder.hpp&gt;
<span class="lineNum">      18 </span>            : #include &lt;boost/algorithm/string/compare.hpp&gt;
<span class="lineNum">      19 </span>            : 
<span class="lineNum">      20 </span>            : /*! \file
<span class="lineNum">      21 </span>            :     Defines basic split algorithms. 
<span class="lineNum">      22 </span>            :     Split algorithms can be used to divide a string
<span class="lineNum">      23 </span>            :     into several parts according to given criteria.
<span class="lineNum">      24 </span>            :     
<span class="lineNum">      25 </span>            :     Each part is copied and added as a new element to the
<span class="lineNum">      26 </span>            :     output container.
<span class="lineNum">      27 </span>            :     Thus the result container must be able to hold copies
<span class="lineNum">      28 </span>            :     of the matches (in a compatible structure like std::string) or
<span class="lineNum">      29 </span>            :     a reference to it (e.g. using the iterator range class).
<span class="lineNum">      30 </span>            :     Examples of such a container are \c std::vector&lt;std::string&gt;
<span class="lineNum">      31 </span>            :     or \c std::list&lt;boost::iterator_range&lt;std::string::iterator&gt;&gt;
<span class="lineNum">      32 </span>            : */
<span class="lineNum">      33 </span>            : 
<span class="lineNum">      34 </span>            : namespace boost {
<span class="lineNum">      35 </span>            :     namespace algorithm {
<span class="lineNum">      36 </span>            : 
<span class="lineNum">      37 </span>            : //  find_all  ------------------------------------------------------------//
<span class="lineNum">      38 </span>            : 
<span class="lineNum">      39 </span>            :         //! Find all algorithm
<span class="lineNum">      40 </span>            :         /*!
<span class="lineNum">      41 </span>            :             This algorithm finds all occurrences of the search string
<span class="lineNum">      42 </span>            :             in the input.
<span class="lineNum">      43 </span>            :             
<span class="lineNum">      44 </span>            :             Each part is copied and added as a new element to the
<span class="lineNum">      45 </span>            :             output container.
<span class="lineNum">      46 </span>            :             Thus the result container must be able to hold copies
<span class="lineNum">      47 </span>            :             of the matches (in a compatible structure like std::string) or
<span class="lineNum">      48 </span>            :             a reference to it (e.g. using the iterator range class).
<span class="lineNum">      49 </span>            :             Examples of such a container are \c std::vector&lt;std::string&gt;
<span class="lineNum">      50 </span>            :             or \c std::list&lt;boost::iterator_range&lt;std::string::iterator&gt;&gt;
<span class="lineNum">      51 </span>            : 
<span class="lineNum">      52 </span>            :             \param Result A container that can hold copies of references to the substrings
<span class="lineNum">      53 </span>            :             \param Input A container which will be searched.
<span class="lineNum">      54 </span>            :             \param Search A substring to be searched for.
<span class="lineNum">      55 </span>            :             \return A reference the result
<span class="lineNum">      56 </span>            : 
<span class="lineNum">      57 </span>            :             \note Prior content of the result will be overwritten.
<span class="lineNum">      58 </span>            : 
<span class="lineNum">      59 </span>            :             \note This function provides the strong exception-safety guarantee
<span class="lineNum">      60 </span>            :         */
<span class="lineNum">      61 </span>            :         template&lt; typename SequenceSequenceT, typename Range1T, typename Range2T &gt;
<span class="lineNum">      62 </span>            :         inline SequenceSequenceT&amp; find_all(
<span class="lineNum">      63 </span>            :             SequenceSequenceT&amp; Result,
<span class="lineNum">      64 </span>            :             Range1T&amp; Input,
<span class="lineNum">      65 </span>            :             const Range2T&amp; Search)
<span class="lineNum">      66 </span>            :         {
<span class="lineNum">      67 </span>            :             return ::boost::algorithm::iter_find(
<span class="lineNum">      68 </span>            :                 Result,
<span class="lineNum">      69 </span>            :                 Input,
<span class="lineNum">      70 </span>            :                 ::boost::algorithm::first_finder(Search) );        
<span class="lineNum">      71 </span>            :         }
<span class="lineNum">      72 </span>            : 
<span class="lineNum">      73 </span>            :         //! Find all algorithm ( case insensitive ) 
<span class="lineNum">      74 </span>            :         /*!
<span class="lineNum">      75 </span>            :             This algorithm finds all occurrences of the search string
<span class="lineNum">      76 </span>            :             in the input. 
<span class="lineNum">      77 </span>            :             Each part is copied and added as a new element to the
<span class="lineNum">      78 </span>            :             output container. Thus the result container must be able to hold copies
<span class="lineNum">      79 </span>            :             of the matches (in a compatible structure like std::string) or
<span class="lineNum">      80 </span>            :             a reference to it (e.g. using the iterator range class).
<span class="lineNum">      81 </span>            :             Examples of such a container are \c std::vector&lt;std::string&gt;
<span class="lineNum">      82 </span>            :             or \c std::list&lt;boost::iterator_range&lt;std::string::iterator&gt;&gt;
<span class="lineNum">      83 </span>            : 
<span class="lineNum">      84 </span>            :             Searching is case insensitive.
<span class="lineNum">      85 </span>            : 
<span class="lineNum">      86 </span>            :             \param Result A container that can hold copies of references to the substrings
<span class="lineNum">      87 </span>            :             \param Input A container which will be searched.
<span class="lineNum">      88 </span>            :             \param Search A substring to be searched for.
<span class="lineNum">      89 </span>            :             \param Loc A locale used for case insensitive comparison
<span class="lineNum">      90 </span>            :             \return A reference the result
<span class="lineNum">      91 </span>            : 
<span class="lineNum">      92 </span>            :             \note Prior content of the result will be overwritten.
<span class="lineNum">      93 </span>            : 
<span class="lineNum">      94 </span>            :             \note This function provides the strong exception-safety guarantee
<span class="lineNum">      95 </span>            :         */
<span class="lineNum">      96 </span>            :         template&lt; typename SequenceSequenceT, typename Range1T, typename Range2T &gt;
<span class="lineNum">      97 </span>            :         inline SequenceSequenceT&amp; ifind_all(
<span class="lineNum">      98 </span>            :             SequenceSequenceT&amp; Result,
<span class="lineNum">      99 </span>            :             Range1T&amp; Input,
<span class="lineNum">     100 </span>            :             const Range2T&amp; Search,
<span class="lineNum">     101 </span>            :             const std::locale&amp; Loc=std::locale() )
<span class="lineNum">     102 </span>            :         {
<span class="lineNum">     103 </span>            :             return ::boost::algorithm::iter_find(
<span class="lineNum">     104 </span>            :                 Result,
<span class="lineNum">     105 </span>            :                 Input,
<span class="lineNum">     106 </span>            :                 ::boost::algorithm::first_finder(Search, is_iequal(Loc) ) );        
<span class="lineNum">     107 </span>            :         }
<span class="lineNum">     108 </span>            : 
<span class="lineNum">     109 </span>            : 
<span class="lineNum">     110 </span>            : //  tokenize  -------------------------------------------------------------//
<span class="lineNum">     111 </span>            : 
<span class="lineNum">     112 </span>            :         //! Split algorithm
<span class="lineNum">     113 </span>            :         /*! 
<span class="lineNum">     114 </span>            :             Tokenize expression. This function is equivalent to C strtok. Input
<span class="lineNum">     115 </span>            :             sequence is split into tokens, separated by separators. Separators 
<span class="lineNum">     116 </span>            :             are given by means of the predicate.
<span class="lineNum">     117 </span>            : 
<span class="lineNum">     118 </span>            :             Each part is copied and added as a new element to the
<span class="lineNum">     119 </span>            :             output container.
<span class="lineNum">     120 </span>            :             Thus the result container must be able to hold copies
<span class="lineNum">     121 </span>            :             of the matches (in a compatible structure like std::string) or
<span class="lineNum">     122 </span>            :             a reference to it (e.g. using the iterator range class).
<span class="lineNum">     123 </span>            :             Examples of such a container are \c std::vector&lt;std::string&gt;
<span class="lineNum">     124 </span>            :             or \c std::list&lt;boost::iterator_range&lt;std::string::iterator&gt;&gt;
<span class="lineNum">     125 </span>            :     
<span class="lineNum">     126 </span>            :             \param Result A container that can hold copies of references to the substrings          
<span class="lineNum">     127 </span>            :             \param Input A container which will be searched.
<span class="lineNum">     128 </span>            :             \param Pred A predicate to identify separators. This predicate is 
<span class="lineNum">     129 </span>            :                 supposed to return true if a given element is a separator.
<span class="lineNum">     130 </span>            :             \param eCompress If eCompress argument is set to token_compress_on, adjacent 
<span class="lineNum">     131 </span>            :                 separators are merged together. Otherwise, every two separators
<span class="lineNum">     132 </span>            :                 delimit a token.
<span class="lineNum">     133 </span>            :             \return A reference the result
<span class="lineNum">     134 </span>            : 
<span class="lineNum">     135 </span>            :             \note Prior content of the result will be overwritten.
<span class="lineNum">     136 </span>            : 
<span class="lineNum">     137 </span>            :             \note This function provides the strong exception-safety guarantee
<a name="138"><span class="lineNum">     138 </span>            :         */</a>
<span class="lineNum">     139 </span>            :         template&lt; typename SequenceSequenceT, typename RangeT, typename PredicateT &gt;
<span class="lineNum">     140 </span><span class="lineCov">          1 :         inline SequenceSequenceT&amp; split(</span>
<span class="lineNum">     141 </span>            :             SequenceSequenceT&amp; Result,
<span class="lineNum">     142 </span>            :             RangeT&amp; Input,
<span class="lineNum">     143 </span>            :             PredicateT Pred,
<span class="lineNum">     144 </span>            :             token_compress_mode_type eCompress=token_compress_off )
<span class="lineNum">     145 </span>            :         {
<span class="lineNum">     146 </span><span class="lineCov">          2 :             return ::boost::algorithm::iter_split(</span>
<span class="lineNum">     147 </span>            :                 Result,
<span class="lineNum">     148 </span>            :                 Input,
<span class="lineNum">     149 </span><span class="lineCov">          2 :                 ::boost::algorithm::token_finder( Pred, eCompress ) );         </span>
<span class="lineNum">     150 </span>            :         }
<span class="lineNum">     151 </span>            : 
<span class="lineNum">     152 </span>            :     } // namespace algorithm
<span class="lineNum">     153 </span>            : 
<span class="lineNum">     154 </span>            :     // pull names to the boost namespace
<span class="lineNum">     155 </span>            :     using algorithm::find_all;
<span class="lineNum">     156 </span>            :     using algorithm::ifind_all;
<span class="lineNum">     157 </span>            :     using algorithm::split;    
<span class="lineNum">     158 </span>            : 
<span class="lineNum">     159 </span>            : } // namespace boost
<span class="lineNum">     160 </span>            : 
<span class="lineNum">     161 </span>            : 
<span class="lineNum">     162 </span>            : #endif  // BOOST_STRING_SPLIT_HPP
<span class="lineNum">     163 </span>            : 
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../../../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.12</a></td></tr>
  </table>
  <br>

</body>
</html>
